package com.zyl.musicdemo.activitys;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.zyl.musicdemo.R;
import com.zyl.musicdemo.view.MyInputView;

public class LoginActivity extends BaseActivity {

    private MyInputView inputPhoto, inputPwd;
    private TextView tvRegistered;
    private Button butLogin;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();
        init();
    }

    private void initView() {
        initNavBar(false, "登入", false);
        inputPhoto = findViewById(R.id.input_view_photo);
        inputPwd = findViewById(R.id.input_view_password);
        tvRegistered = findViewById(R.id.tv_registered);
        butLogin = findViewById(R.id.but_login);
    }

    private void init() {

    }

    //注册事件
    public void onRegistered(View v) {
        Intent intent = new Intent(this, RegisteredActivity.class);
        startActivity(intent);
    }

    //登入事件
    public void onLogin(View v) {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        finish();
    }
}